package com.hfy.music.controller;

import com.hfy.music.service.NoticeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

/**
 * @ author 韩
 * time: 2024/9/25 15:01
 */
@RestController
@RequestMapping("/notice")
@Tag(name = "通知中心控制器" ,description = "会负责各种通知的接口")
public class NoticeController {

    @Autowired
    private NoticeService noticeService;

    @GetMapping("/list/{account}")
    @Operation(summary = "对个人收到的通知进行罗列")
    @Parameters({@Parameter(name = "account", description = "账号")})
    public Result getPersonalNotices(@PathVariable("account") Long account ){
        return noticeService.getPersonalNotices(account);
    }

}
